package com.shhic.hhplt.server.service;

import com.mongodb.client.FindIterable;
import com.shhic.hhplt.server.model.*;
import org.bson.Document;

import java.util.List;

public interface ITestReportService {
    /**
     * 保持mysql数据库和mongo数据库的一致性
     * */
    void keepProductBindingCodeUniformity();

    List<ProductSuite> getProductTestStatusList(String productName, String idCode);

    ProductTestResult getProductTestResult(String productName, String idCode);

    void insertProductSuite(ProductTestResult p, List<ProductSuite> ptsList);

    void updateProductTestResultSucc(String productName, String idCode);

    String getTestReportXml(String persistLocation);

    void updateTestReportXml(String persistLocation, String reportXmlStr);

    void insertTestReportXml(String persistLocation, String reportXmlStr);

    List<ProductSuite> queryProductSuite(ProductSuiteQuery query);

    void insertProductTestResult(ProductTestResult p);

    void insertProductBindingCode(List<ProductBindingCode> pbcl);

    ProductBindingCode getProductBindingCode(String productName,
                                             String codeName, String code);

    List<String> getAllBindingCodeNameList(String productName);

    List<ProductBindingCode> queryBindingCode(ProductBindingCodeQuery query);

    void insertProductBindingCode(ProductBindingCode pbc);

    void lostGroupBindingCode(ProductBindingCode pbc);

    Document getBindingCodeByPI(String idCode);

    List<String> findAllIdCodeByCode(ProductBindingCode bindingCode);

}
